package mobilesearch.receiver;

import java.util.ArrayList;

import mobilesearch.data.FileData;
import mobilesearch.ui.OnSearchResultListener;
import android.util.Log;

public class FileReceiver {

	private static final String TAG = "EmailReceiver";
	private ArrayList<FileData> fileList;
	private OnSearchResultListener listener;
	
	public FileReceiver(ArrayList<FileData> fileList, OnSearchResultListener listener) {
		this.fileList = fileList;
		this.listener = listener;
	}
	
	public void processFileData(){
		int size = this.fileList.size();
		Log.i(TAG, "file list"+ size);
		for(int i = 0; i < size; i++){
			FileData data = this.fileList.get(i);
			String fileName = data.getFileName();
			String fileSize = data.getFileSize();
			this.listener.onReceiveFileData(fileName, fileSize);
		}
	}

}
